<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Uduemc Default Login Page</title>
</head>
<body>
	<h1>Login Page</h1>
	<h3>自定义登录页面</h3>
	<form th:action="@{/authentication/form}" method="post">
		<table>
			<tr>
				<td>用户名：</td>
				<td><input type="text" name="username" /></td>
			</tr>
			<tr>
				<td>密码：</td>
				<td><input type="password" name="password" /></td>
			</tr>
			<tr>
				<td>验证码：</td>
				<td><input type="text" name="validationCode" style="width: 50%;" /><img src="/image/code.jpg" /></td>
			</tr>
			<tr>
				<td colspan="2"><button type="submit">登录</button></td>
			</tr>
		</table>
	</form>
	<h3>手机短信登录</h3>
	<form th:action="@{/authentication/mobile}" method="post">
		<table>
			<tr>
				<td>手机号码：</td>
				<td><input type="text" name="mobile" /></td>
			</tr>
			<tr>
				<td>验证码：</td>
				<td><input type="text" name="smsCode" style="width: 50%;" /><a href="javascript:void(0);" id="sendMessage">发送短信验证码</a></td>
			</tr>
			<tr>
				<td colspan="2"><button type="submit">登录</button></td>
			</tr>
		</table>
	</form>
	<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
	<script type="text/javascript">
		/*<![CDATA[*/
		$(function() {
			$("#sendMessage").click(function() {
				var url = '/sms/code?mobile=' + $("input[name='mobile']").val();
				$.get(url, function(response) {
					console.log('response', response);
				});
			});
		})
		/*]]>*/
	</script>
</body>
</html>